home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / pascal / wndw70.zip / W70-VAR.INC < prev    next >
Text File  |  1993-06-10  |  9KB  |  184 lines

  1. { ========================================================================== }
  2. { W70-var.inc - Variables for Multi-level windows         ver 7.0a, 06-10-93 }
  3. {                                                                            }
  4. { This file contains all the variables needed for WNDW70.TPU.  This lets you }
  5. { know the variables being used, but it cannot be recompiled with WNDW70.PAS }
  6. { unless you have the complete source code.                                  }
  7. {   Copyright (C) 1993 by James H. LeMay,  All rights reserved.              }
  8. { ========================================================================== }
  9.  
  10. const
  11.   { Change these to suit your data needs.  Source code required. }
  12.   MaxWndw        =  5;  { 1 - 254 : windows per video page }
  13.   MaxVirtualWndw =  5;  { 0 - 254 : total number of virtual windows - 1 }
  14.   MaxPageUsed    =  1;  { 0 - MaxPage : top video page number (usually 0) }
  15.                         { This can be greater than an expected MaxPage }
  16.  
  17. type
  18.   { Place all of your window names needed for random-access here: }
  19.   WindowNames = (
  20.     Window0,       { Reserved for the non-window area. }
  21.     Window1,  Window2,  Window3,  Window4,  Window5,
  22.     aWindow,       { A name for non-unique windows. }
  23.     FreeWindow);   { Reserved for a freed virtual windows stat. }
  24.   Borders = (
  25.     NoBrdr, BlankBrdr, SingleBrdr, DoubleBrdr, HdoubleBrdr,
  26.     VdoubleBrdr, SolidBrdr, EvenSolidBrdr, ThinSolidBrdr1,
  27.     ThinSolidBrdr2, LhatchBrdr, MhatchBrdr, HhatchBrdr,
  28.     UserBrdr1, UserBrdr2);
  29.   BrdrParts = (
  30.     BrdrTL,BrdrTH,BrdrTR,BrdrLV,BrdrRV,
  31.     BrdrBL,BrdrBH,BrdrBR,BrdrLT,BrdrHL,
  32.     BrdrRT,BrdrTT,BrdrVL,BrdrBT,BrdrCL);
  33.   BrdrRec =
  34.     record
  35.       case byte of
  36.         1: (TL,TH,TR,LV,RV,BL,BH,BR,LT,HL,RT,TT,VL,BT,CL: char);
  37.         2: (BrdrArray: array[BrdrTL..BrdrCL] of char);
  38.       end;
  39.         { The first letter of the border acronym means:
  40.             T = top         B = bottom
  41.             V = vertical    H = horiz
  42.             L = left        R = right
  43.             C = cross
  44.           The second letter is the same except for:
  45.             T = tee         L = line
  46.           Here they are in their relative positions:
  47.             TL  TH  TT  TH  TR
  48.             LV      VL      RV
  49.             LT  HL  CL  HL  RT
  50.             LV      VL      RV
  51.             BL  BH  BT  BH  BR    }
  52.  
  53.   DirType = (NoDir,Up,Down,VeryTop,Top,Bottom,VeryBottom,FarLeft,Left,Right,
  54.              FarRight,Center,Horiz,Vertical);
  55.   WordArray        = array[0..32000] of word;  { Virtual array }
  56.   WordArrayPtrType = ^WordArray;
  57.   WndwStatType =
  58.     record
  59.       WSrow,WScol,WSrows,WScols,WSrow2,WScol2: byte; { Window w/ border }
  60.       Wrow ,Wcol ,Wrows ,Wcols ,Wrow2 ,Wcol2:  byte; { Window only }
  61.       WndwAttr,BrdrAttr,
  62.       OrigAttr:            integer;     { Original window attribute. }
  63.       WSbrdr,WSline:       Borders;
  64.       WSname:              WindowNames;
  65.       WSwhereR,WSwhereC:   byte;             { window-relative }
  66.       WSmodes:             word;
  67.       WScursor:            word;             { cursor mode for the window }
  68.       ULcol,ULcols,ULrows: byte;             { peculiar Underlay location }
  69.       ULbytes:             word;             { size in bytes for underlay }
  70.       ULptr:               WordArrayPtrType; { For Underlay }
  71.       VScrRec:             VScrRecType;      { Screen stats for Qwik }
  72.       RefRow,RefCol:       byte;             { Viewed corner in virtual wndw
  73.                                                or original WSrow & WScol for
  74.                                                hidden window }
  75.       ViewBrdr:            Borders;          { Border viewed on the CRT }
  76.       VI:                  word;             { Virtual level index }
  77.     end;
  78.   WndwStatsType    = array[0..MaxWndw]        of WndwStatType;
  79.   {$ifdef AddVirtual }
  80.   VirtualStatsType = array[0..MaxVirtualWndw] of WndwStatType;
  81.   {$endif }
  82.   MarginRec =
  83.     record   { Margins for limiting movement with MoveWindow or VResizeWindow }
  84.       LeftMargin, RightMargin, TopMargin, BottomMargin: byte;
  85.     end;
  86.  
  87. const
  88.   Brdr: array [BlankBrdr..UserBrdr2] of BrdrRec =
  89.     {   TL,TH,TR,LV,RV,BL,BH,BR,LT,HL,RT,TT,VL,BT,CL  }
  90.     ((BrdrArray:'               '),  { BlankBrdr      }
  91.      (BrdrArray:'┌─┐││└─┘├─┤┬│┴┼'),  { SingleBrdr     }
  92.      (BrdrArray:'╔═╗║║╚═╝╠═╣╦║╩╬'),  { DoubleBrdr     }
  93.      (BrdrArray:'╒═╕││╘═╛╞═╡╤│╧╪'),  { HdoubleBrdr    }
  94.      (BrdrArray:'╓─╖║║╙─╜╟─╢╥║╨╫'),  { VdoubleBrdr    }
  95.      (BrdrArray:'█████████─██│█┼'),  { SolidBrdr      }
  96.      (BrdrArray:'█▀████▄██─█▀│▄┼'),  { EvenSolidBrdr  }
  97.      (BrdrArray:'▐▀▌▐▌▐▄▌▐─▌▀│▄┼'),  { ThinSolidBrdr1 }
  98.      (BrdrArray:'▄▄▄▌▐▀▀▀▌─▐▄│▀┼'),  { ThinSolidBrdr2 }
  99.      (BrdrArray:'░░░░░░░░░─░░│░┼'),  { LhatchBrdr     }
  100.      (BrdrArray:'▒▒▒▒▒▒▒▒▒─▒▒│▒┼'),  { MhatchBrdr     }
  101.      (BrdrArray:'▓▓▓▓▓▓▓▓▓─▓▓│▓┼'),  { HhatchBrdr     }
  102.      (BrdrArray:'···············'),  { UserBrdr1      }  { Make your own }
  103.      (BrdrArray:'∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙')); { UserBrdr2      }  { Make your own }
  104.  
  105.   { Valid modes for SetWindowModes: }
  106.   RelMode       = $0001; { 00000001b - Window relative; temporary stats }
  107.   PermMode      = $0002; { 00000010b - Can't be moved or removed, no underlay}
  108.   ShadowLeft    = $0004; { 00000100b - Shadow on the left side }
  109.   ShadowRight   = $0008; { 00001000b - Shadow on the right side }
  110.   ShadowTrans   = $0010; { 00010000b - Allows transparent shadows }
  111.   ZoomMode      = $0020; { 00100000b - Zoom effect on Make and AccessWindow }
  112.   CursorOffMode = $0040; { 01000000b - Leave cursor off at all times }
  113.   HiddenMode    = $0080; { 10000000b - Create window while Hidden }
  114.   VirtualMode   = $0100; { 00000001b - Create Virtual window as well }
  115.   SeeThruMode   = $0200; { 00000010b - Doesn't clear screen inside window }
  116.   NoHideMode    = $0400; { 00000100b - Ignores request to hide window }
  117.   NoAccessMode  = $0800; { 00001000b - Ignores request to access window }
  118.   NoMoveMode    = $1000; { 00010000b - Ignores request to move/resize window }
  119.   { Other modes for program detection: }
  120.   ToCrtMode     = $2000; { 00100000b - Writing to CRT }
  121.   ToHiddenMode  = $4000; { 01000000b - Writing to Hidden window }
  122.   ToVirtualMode = $8000; { 10000000b - Writing to Virtual window }
  123.  
  124.   { This sets up the type of shadows for the entire program }
  125.   ShadowColor: integer = LightGray; { Shadow color - opaque or transparent }
  126.   ShadowChar:  char    = ' ';       { Shadow character for opaque shadows }
  127.  
  128.   TitleOfs:    byte    = 1;     { # of cols title placed offset from border }
  129.   PreferMultiTask: boolean = true;  { Use Multitasking buffer if possible. }
  130.  
  131. var
  132.   { Boolean values corresponding to the above modes.  Automatically
  133.     set for the window you are in. }
  134.   RelFlag, PermFlag, ZoomFlag, HiddenFlag, VirtualFlag, CursorOffFlag,
  135.   SeeThruFlag, NoHideFlag, NoAccessFlag, NoMoveFlag,
  136.   ToCrtFlag, ToHiddenFlag, ToVirtualFlag, ShadowTransFlag: boolean;
  137.  
  138.   { -- Keep the following 10 variables in order for PageStatRec! -- }
  139.   WndwStat:       WndwStatsType;
  140.   TopWndwStat:    WndwStatType;  { Window stats on the top Level Index }
  141.   TWS:            WndwStatType absolute TopWndwStat;    { one and the same }
  142.    {$ifdef AddVirtual }
  143.   TopVirtualStat: WndwStatType;  { Optional virtual stats for top window. }
  144.   TVS:            WndwStatType absolute TopVirtualStat; { one and the same }
  145.    {$endif }
  146.   LI,                         { Top Level Index }
  147.   HLI,                        { Hidden Level Index }
  148.   WI:             word;       { Window Index to save top stat (HLI or LI) }
  149.   PLI:            byte;       { Top Permanent Level Index }
  150.   CursorDefault,              { Default cursor mode for each window }
  151.   WindowModes:    word;       { Logical sum of all window modes listed above }
  152.   Margins:        MarginRec;  { Limits for moving or resizing windows }
  153.  
  154. type
  155.   PageStatRec =
  156.     record
  157.       PageWS:     WndwStatsType;        { Equivalent to WndwStat }
  158.       PageTWS:    WndwStatType;         { Equivalent to TopWndwStat }
  159.         {$ifdef AddVirtual }
  160.       PageTVS:    WndwStatType;         { Equivalent to TopVirtualStat }
  161.         {$endif }
  162.       PageLI,PageHLI,PageWI: word;      { Equivalent to LI, HLI, and WI }
  163.       PagePLI:               byte;      { Equivalent to PLI }
  164.       PageCursor,
  165.       PageModes:             word;      { Equivalent to WindowModes. }
  166.       PageMargins:           MarginRec; { Equivalent to Margins. }
  167.     end;
  168.   PageStatRecs = array[0..MaxPageUsed] of PageStatRec;
  169.  
  170. var
  171.    {$ifdef MultiPage }
  172.   PageStat:       ^PageStatRecs;
  173.   TopPageStat:    PageStatRec absolute WndwStat;
  174.    {$endif }
  175.    {$ifdef AddVirtual }
  176.   VirtualStat:    ^VirtualStatsType;
  177.   VirtualRows,               { Default rows for virtual screen. }
  178.   VirtualCols:    byte;      { Default cols for virtual screen. }
  179.   VirtualSize:    word;      { VirtualCols * (VirtualRow+2) * 2 }
  180.    {$endif }
  181.   MaxValidPage:   byte;      { The lesser of MaxPage or MaxPageUsed }
  182.   ZoomDelay:      byte;      { Delay in ms between each Qbox for zoom effect }
  183.   CrtWI:          word;      { Active Window Index on CRT. }
  184.